/**
 * 模组类
 */

import A3ObjectGroup from "../A3ObjectGroup.js";
import A3ObjectTypes from "../A3ObjectTypes.js";
import { A3RevolvedDoor } from "./dynamic/A3Furnitures.js";
import { A3DoubleDoor } from "./static/A3Ground.js";

function newA3Module( data ) {
  const type = data.type;
  let obj;

  switch( type ) {

    case A3ObjectTypes.DoubleDoor: obj = A3DoubleDoor.fromJson( data );break;
    case A3ObjectTypes.RevolvedDoor: obj = A3RevolvedDoor.fromJson( data );console.log(obj); break;

    default: obj = A3ObjectGroup.fromJson( data ); break;
  }

  return obj;

}

export {
  newA3Module
};